package com.WJY.service.impl;

import com.WJY.dao.FlowerDao;
import com.WJY.pojo.Flower;
import com.WJY.service.FlowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FlowerServiceImpl implements FlowerService {

    @Autowired
    private FlowerDao flowerDao;

    @Override
    public List<Flower> queryFlowerList() {
        return flowerDao.queryFlowerList();
    }

    @Override
    public Flower queryFlowerById(int id) {
        return flowerDao.queryFlowerById(id);
    }

    @Override
    public List<Flower> queryFlowerByName(String name) {
        return flowerDao.queryFlowerByName(name);
    }

    @Override
    public int delFlowerById(int id) {
        return flowerDao.delFlowerById(id);
    }

    @Override
    public int addFlower(Flower flower) {
        return flowerDao.addFlower(flower);
    }

    @Override
    public int updateFlower(Flower flower) {
        return flowerDao.updateFlower(flower);
    }
}
